<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <link th:href="@{css/fonts.css}" rel="stylesheet"/>
    <title>平原</title>
    <style>
        /* 兼容性字体设置 */
        body {
            font-family: "Source Sans Pro", sans-serif;
            background: #1A2332;
            color: #E0E0E0;
            line-height: 1.5;
            -fs-pdf-font-embed: embed; /* 确保字体嵌入 */
        }

        /* 卡片式布局 */
        .card {
            background: #2D3B4D;
            border-radius: 12px;
            border: 2px solid #3C4B5E;
            margin: 20px auto;
            padding: 25px;
            width: 90%;
            box-sizing: border-box;
        }

        h1 {
            color: #4A90E2;
            font-size: 32px;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
            margin: 20px 0;
        }

        /* 兼容性表格样式 */
        table {
            border-collapse: collapse;
            width: 100%;
            background: #36465C;
            margin: 20px 0;
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        }

        td, th {
            padding: 12px 15px;
            border: 1px solid #45576F;
            text-align: center;
            font-size: 16px;
        }

        th {
            background: #4A647D;
            color: #FFFFFF;
            font-weight: 600;
        }

        /* 状态指示器 */
        .warm {
            color: #FFD700;
            background: rgba(255,215,0,0.1);
            font-weight: bold;
        }

        .cold {
            color: #00B4FF;
            background: rgba(0,180,255,0.1);
            font-weight: bold;
        }

        /* 图片样式 */
        img {
            width: 80px;  /* 固定图片尺寸 */
            height: 80px;
            display: block;
            margin: 0 auto;
            -fs-fit-images-to-width: 80px; /* 确保图片缩放 */
        }

        /* 时间显示样式 */
        tr:last-child td {
            font-size: 14px;
            color: #A0B1C5;
            background: #2D3B4D;
        }

        /* 内容容器 */
        .content {
            border: 1px solid #3C4B5E;
            border-radius: 8px;
            overflow: hidden; /* 防止边框溢出 */
        }
    </style>

</head>

<body>
<!-- 图片的宽度 按像素计算 -->
<w>2600</w>

<div class="card">
    <h1>平原查询结果</h1>
    <div class="card-layer">

        <div>
            <div class="content">
                <table>
                    <tr>
                        <td>地球</td>
                        <td>夜灵平野</td>
                        <td>福尔图娜</td>
                        <td>魔胎之境</td>
                        <td>扎里曼</td>
                    </tr>
                    <tr>
                        <td th:text="${earth.state}"
                            th:classappend="${earth.isDay} ? 'warm' : 'cold'"></td>
                        <td th:text="${cetus.state}"
                            th:classappend="${cetus.isDay} ? 'warm' : 'cold'"></td>
                        <td th:text="${vallis.state}"
                            th:classappend="${vallis.isWarm} ? 'warm' : 'cold'"></td>
                        <td th:text="${cambion.active}"
                            th:classappend="${cambion.active} == 'FASS'? 'warm' : 'cold'"></td>
                        <td th:text="${zariman.state}"
                            th:classappend="${zariman.isCorpus} ? 'cold' : 'warm'"></td>
                    </tr>
                    <tr>
                        <td><img th:src="${earth.isDay} ? @{img/day.png} : @{img/night.png}"/></td>
                        <td><img th:src="${cetus.isDay} ? @{img/day.png} : @{img/night.png}"/></td>
                        <td><img th:src="${vallis.isWarm} ? @{img/day.png} : @{img/cold.png}"/></td>
                        <td><img th:if="${cambion.active} == FASS" th:src="@{img/day.png}"/>
                            <img th:if="${cambion.active} != FASS" th:src="@{img/night.png}"/>
                        </td>
                        <td></td>
                    </tr>
                    <tr>
                        <td th:text="${earth.timeLeft}"></td>
                        <td th:text="${cetus.timeLeft}"></td>
                        <td th:text="${vallis.timeLeft}"></td>
                        <td th:text="${cambion.timeLeft}"></td>
                        <td th:text="${zariman.timeLeft}"></td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
</div>
</body>

</html>
